// 转发到3000端口
const http = require('node:http')
const url = require('node:url')

http.createServer((req,res) => {
    const {pathname} = url.parse(req.url)
    console.log(pathname,'pathname')
    console.log(pathname === '/api')
    if (pathname === '/api') {
        console.log('代理判断')
        res.end('hhh success')
    }
}).listen(3000,() => {
    console.log('3000 start...')
})